package com.letwal.cmcvnd.extend

import com.letwal.cmcvnd.anetwork.ApiUrl

fun String.toPathFormat(): String {
    if (this.startsWith("/")) return this
    else return ("/$this")
}

fun String.toAfricaPathFormat(): String {
    val gPath = toPathFormat()
    return ApiUrl.BASE_URL_AFRICA + gPath
}

fun String.toVietnamPathFormat(): String {
    val gPath = toPathFormat()
    return ApiUrl.BASE_URL_VND + gPath
}

fun String.toFullUrlPath(): String {
    return (ApiUrl.BASE_URL + ApiUrl.BASE_PATH + this)
}

fun String.toCombineUrlPath(): String {
    return (ApiUrl.BASE_PATH + this)
}
